package org.guys.magic.json;

import java.util.List;

/**
 * mock 类
 */
class App {
    private String appCode;
    private String appName;
    private List<Phone> phones;

    @Override
    public String toString() {
        return "App{" +
                "appCode='" + appCode + '\'' +
                ", appName='" + appName + '\'' +
                ", phones=" + phones +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof App)) return false;

        App app = (App) o;

        if (!appCode.equals(app.appCode)) return false;
        if (appName != null ? !appName.equals(app.appName) : app.appName != null) return false;
        return !(phones != null ? !phones.equals(app.phones) : app.phones != null);

    }

    @Override
    public int hashCode() {
        int result = appCode.hashCode();
        result = 31 * result + (appName != null ? appName.hashCode() : 0);
        result = 31 * result + (phones != null ? phones.hashCode() : 0);
        return result;
    }

    public String getAppCode() {
        return appCode;
    }

    public void setAppCode(String appCode) {
        this.appCode = appCode;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public List<Phone> getPhones() {
        return phones;
    }

    public void setPhones(List<Phone> phones) {
        this.phones = phones;
    }
}
